"""
Lesson 11. Concatenation
"""
name = 'John'
age = 30

print('My name is ' + name + '. I\'m ' + str(age))
print('My name is %(name)s. I\'m %(age)d' %{'name': name, 'age': age})
print('My name is %s. I\'m %d' %(name, age))
print('Title: %s, Price: %.2f' %('Sony', 40))

# format
print('My name is {}. I\'m {}'.format(name, age))
print('My name is {0}. I\'m {1}'.format(name, age))
print('My name is {name}. I\'m {age}'.format(name=name, age=age))

# f-strings
print(f'My name is {name}. I\'m {age}')
print(f'My name is {name}. I\'m {age + 5}')

print('5 + 2 = {}'.format(5 + 2))
print(f'5 + 2 = {5 + 2}')

SHAKAR = 'Xorazim Shakar'
WEIGHT = 50
PRICE = 800000
print('Bugun', WEIGHT, 'kg ' + SHAKAR.lower(), str(PRICE) + " so\'m.")
print('Bugun %(KG)d kg %(SHSH)s %(NARX)d so\'m.' %{'SHSH':SHAKAR.lower(), 'KG':WEIGHT, 'NARX':PRICE})
print('Bugun %s %d so\'m.' %(SHAKAR.lower(), PRICE))
print('Bugun %s %.2f so\'m.' %(SHAKAR.lower(), PRICE))

print('Bugun {} {} so\'m.' .format(SHAKAR.lower(), PRICE))
print('Bugun {0} {1} so\'m.' .format(SHAKAR.lower(), PRICE))
print('Bugun {saxir} {pul} so\'m.' .format(saxir=SHAKAR, pul=PRICE))
# 
print(f'Bugun {SHAKAR} {PRICE} so\'m.')
print(f'Bugun {SHAKAR} {PRICE + 5} so\'m.')
#
print('18 + 21 = {} '.format(18 + 21))
print(f'18 + 21 = {18 + 21}')
